package thread_03;
/*
    static void sleep(long millis)：使当前正在执行的线程停留（暂停执行）指定的毫秒数
 */
public class ThreadSleepDemo {
    public static void main(String[] args) {
        ThreadSleep ts1 = new ThreadSleep();
        ThreadSleep ts2 = new ThreadSleep();
        ThreadSleep ts3 = new ThreadSleep();

        ts1.setName("曹操");
        ts2.setName("刘备");
        ts3.setName("孙权");
/*
 String toString()
          返回该线程的字符串表示形式，包括线程名称、优先级和线程组。
 */
        ts1.start();
        ts2.start();
        ts3.start();
        System.out.println(ts1.toString());
    }
}
